﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using TelerikedIn.Models;

namespace TelerikedIn.WebApp.Areas.Administration.Models
{
    public class SkillViewModel
    {
        public int Id { get; set; }

        [Required, StringLength(100)]
        public string Name { get; set; }

        public static Expression<Func<Skill, SkillViewModel>> FromSkill
        {
            get
            {
                return skill => new SkillViewModel
                {
                    Id = skill.Id,
                    Name = skill.Name
                };
            }
        }
    }
}